{% if page_obj %}
<nav class="pagination is-centered" role="navigation" aria-label="pagination">
    {% if page_obj.has_previous %}
    <a class="pagination-previous" href="?page={{ page_obj.previous_page_number }}">Previous</a>
    {% endif %}
    {% if page_obj.has_next %}
    <a class="pagination-next" href="?page={{ page_obj.next_page_number }}">Next page</a>
    {% endif %}
    <ul class="pagination-list">
        {% if page_obj.has_previous %}
        <li><a class="pagination-link" aria-label="Goto page 45" href="?page={{ page_obj.previous_page_number }}">
                {{ page_obj.previous_page_number }}</a></li>
        {% endif %}
        <li><a class="pagination-link is-current" aria-label="Page {{ page_obj.number }}" aria-current="page"
                href='?page={{ page_obj.number }}'>{{ page_obj.number }}</a></li>
        {% if page_obj.has_next %}
        <li><a class="pagination-link" href="?page={{ page_obj.next_page_number }}"
                aria-label="Goto page {{ page_obj.next_page_number }}">{{ page_obj.next_page_number }}</a></li>
        {% endif %}
    </ul>
</nav>
{% endif %}